﻿<link href="@Url.Content("~/content/subnav.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/content/activitie_detail.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/content/table_btn.css")" rel="stylesheet" type="text/css"/>

<!--[if lt IE 8]>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
<![endif]-->

<noscript>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/content/activitie_noscript.css")" rel="stylesheet" type="text/css"/>
</noscript>

@model IEnumerable<PessModel.Subject>

@{
    ViewBag.Title = "Index";
}

<h2>评分规则</h2>

<div id="operate">
@*    @Html.ActionLink("新建", "Create")*@
</div>
<div class="displayConScroe">
    <table>
        <tr>
            <th>
                @*@Html.DisplayNameFor(model => model.Name)*@学科组
            </th>
            <th>
                规则数量
            </th>
            <th>
                允许组长设定规则
            </th>
            <th></th>
        </tr>

    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem=>item.Rules.Count)
            </td>
            <td>
                @if(item.AllowExpertLeaderSetRules!=null&&item.AllowExpertLeaderSetRules==true)
                {<span>是</span>}
                else{<span>否</span>}
            </td>
            <td>
                @if(Roles.IsUserInRole("Admin"))
                {
                    @Html.ActionLink("编辑", "Edit","Subject", new { id=item.ID },null) 
                }
                @Html.ActionLink("详细", "Details", new { subjectID=item.ID }) 
@*                @Html.ActionLink("删除", "Delete", new { subjectID=item.ID })*@
            </td>
        </tr>
    }

    </table>
</div>